/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 14785
 * Date: 2025-07-15
 * Time: 23:57
 */
/*import java.util.Arrays;
import java.util.Date;*/


import com.bite.www.TestDemo;

import java.util.*;

//一般不写
/*
import static java.lang.Math.*;
import static java.lang.System.*;
*/

/**
 * @Author 12629
 * @Description：
 */
class Student {
    //字段  属性   成员变量：定义在类当中 ，方法的外边的
    public String name;
    private int age;
    private String stuNum;//学号

    public static String className;//班级


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getStuNum() {
        return stuNum;
    }

    public void setStuNum(String stuNum) {
        this.stuNum = stuNum;
    }

    public Student() {
        System.out.println("不带参数的构造方法.....");
        //this("zhagnsan",10,"123456789");
    }

    public Student(String name, int age, String stuNum) {
        this.name = name;
        this.age = age;
        this.stuNum = stuNum;
        System.out.println("调用了带有3个参数的构造方法.....");
    }

    //.....
    //成员方法
    public void eat() {
        System.out.println(this.name+" 正在吃饭！");
    }

    public void doClass() {
        func();
        System.out.println(this.name+" 正在上课.....");
    }

    private void func() {
        //其他的业务操作
        System.out.println("这个方法就是为本类其他访问服务的不对外公开");
    }

    public void show() {
        System.out.println(" 姓名："+this.name+" 年龄："+this.age+" 学号："
                +this.stuNum+" 班级："+className);
    }

}

public class Test {

    public static void main(String[] args) {
        //Student.className = "1班";


        Student student1 = null;
        /*student1.className = "1班";
        System.out.println(student1.className );
*/
        System.out.println(student1.name);
    }

    public static void main6(String[] args) {

        Student student1 = new Student("zhangsan",10,"1234");
        //student1.className = "1班";


        Student.className = "1班";

        student1.show();

        Student student2 = new Student("lisi",12,"12348");

        student2.show();

    }

    public static void main5(String[] args) {
        TestDemo testDemo = new TestDemo();
        //System.out.println(testDemo.a);
    }













    public static void main4(String[] args) {
        double x = 30;
        double y = 40;
        // 静态导入的方式写起来更方便一些.
        //double result = Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));
        /*double result = sqrt(pow(x, 2) + pow(y, 2));
        out.println(result);*/
    }
    public static void main3(String[] args) {
        int[] array = {1,2,3,4,5};
        System.out.println(Arrays.toString(array));
        Date date = new Date();

        //Arrays

        java.sql.Date date1 = new java.sql.Date(10);

    }

    public static void main2(String[] args) {
        //Student student2 = new Student("zhangsan",10,"1234");

        Student student1 = new Student();

        //student1.name = "zhagnsan";

        student1.setName("zhagnsan");
        System.out.println(student1.getName());
        student1.setAge(10);
        System.out.println(student1.getAge());
        student1.setStuNum("12345");
        System.out.println(student1.getStuNum());

    }

 /*   public static void main1(String[] args) {
        //对象的实例化
        Student student1 = new Student();
        student1.name = "zhagnsan";
        student1.age = 10;
        student1.stuNum = "20241003";
        System.out.println(student1.name);
        System.out.println(student1.age);
        System.out.println(student1.stuNum);
        student1.doClass();
        student1.eat();
        System.out.println("===============");
        Student student2 = new Student();
        student2.name = "lisi";
        student2.age = 12;
        student2.stuNum = "20241013";
        System.out.println(student2.name);
        System.out.println(student2.age);
        System.out.println(student2.stuNum);
        student2.doClass();
        student2.eat();
    }*/
}
